#include "ticketsviewnavigationfactory.h"

#include "ticketssidebar.h"

#include <coreplugin/icore.h>

Core::NavigationView TicketsViewNavigationFactory::createWidget()
{
    Core::NavigationView view;
    view.widget = new TicketsSideBar;

    return view;
}

QString TicketsViewNavigationFactory::displayName() const
{
    return "Tickets";
}

int TicketsViewNavigationFactory::priority() const
{
    return 1000;
}

QString TicketsViewNavigationFactory::id() const
{
    return "tickets";
}

void TicketsViewNavigationFactory::saveSettings(int position, QWidget *widget)
{
    Q_UNUSED(position);
    TicketsSideBar *tsb = qobject_cast<TicketsSideBar *>(widget);
    if (!tsb)
        return;

    tsb->saveSettings();
}

void TicketsViewNavigationFactory::restoreSettings(int position, QWidget *widget)
{
    Q_UNUSED(position);
    TicketsSideBar *tsb = qobject_cast<TicketsSideBar *>(widget);
    if (!tsb)
        return;

    tsb->restoreSettings();
}

